How Battery Energy Storage Systems Work